Skip to content

Merge parent processor attributes#5

Open
david-sawatzke wants to merge 1 commit intoprobe-rs:masterfrom
david-sawatzke:dev/processor_merging
Open

Merge parent processor attributes#5
david-sawatzke wants to merge 1 commit intoprobe-rs:masterfrom
david-sawatzke:dev/processor_merging

Conversation

@david-sawatzke
Copy link

According to https://www.keil.com/pack/doc/CMSIS/Pack/html/pdsc_family_pg.html#element_processor, the attributes of the processor in e.g. the family are used for processors in e.g. the device, if they're not set there.

In pack files like the ones for the XMC1000 series this is used (abbreviated):

    <family Dfamily="XMC1000" Dvendor="Infineon:7">
      <processor Dcore="Cortex-M0" DcoreVersion="r0p0" Dfpu="NO_FPU" Dmpu="NO_MPU" 
      <subFamily DsubFamily="XMC1100 Series">
      <device Dname="XMC1100-Q024x0008">
        <processor Dclock="32000000"/>

and for other pack files like: Keil.STM32F1xx_DFP.2.3.0.pack.

With this PR attributes of the parent processor element are merged into the device processor element if one already exists, previously two processors would have been created, which is somewhat nonsensical.

If there are two processor instances in the family or subFamily as well as in the device, they probably need to be matched using Pname & Punits but I'm not sure. Thus this gives an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant